import request from '@/utils/request';

//获取一级分类列表
export const reqCategory1List = () => {
  return request.get('/admin/product/category1/list');
};

//获取二级分类列表
export const reqCategory2List = (category1Id) => {
  return request.get(`/admin/product/category2/list/${category1Id}`);
};

//获取三级分类列表
export const reqCategory3List = (category2Id) => {
  return request.get(`/admin/product/category3/list/${category2Id}`);
};
//获取平台属性列表
export const reqAttrList = (category1Id, category2Id, category3Id) => {
  return request.get(`/admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`);
};
//添加属性或者修改属性
export const reqAddOrUpdateAttr = (data) => request.post('/admin/product/saveAttrInfo', data);
